package com.jdd.modules.project.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class SysProject {

    @TableId(type = IdType.ID_WORKER_STR)
    @ApiModelProperty("id")
    private String id;
    @ApiModelProperty("项目编号")
    private String projectCode;
    @ApiModelProperty("项目名称")
    private String projectName;
    @ApiModelProperty("管理员账号")
    private String adminUserName;
    @ApiModelProperty("管理员姓名")
    private String adminUser;
    @ApiModelProperty("创建人")
    private String createBy;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("更新人")
    private String updateBy;
    @ApiModelProperty("更新时间")
    private Date updateTime;
    @ApiModelProperty("删除状态 0未删除，1已删除")
    @TableLogic
    private Integer delFlag;
    @ApiModelProperty("系统用户数量")
    @TableField(exist = false)
    private Integer sysUserNumber;
    @ApiModelProperty("项目数量")
    @TableField(exist = false)
    private Integer projectNumber;
    @ApiModelProperty("住户数量")
    @TableField(exist = false)
    private Integer projectUserNumber;

    @TableField(exist = false)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date opTime_begin;

    @TableField(exist = false)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date opTime_end;
}
